
import data from "./json数据的路径"
// utils.dbconn()

localforage.config({
  // driver: [localforage.INDEXEDDB],
  name: 'INDEXDB',
  version: "1.0"
})

async function getInOut(json) {
  let workers = await localforage.getItem("worker") || new Map()
  workers.forEach((item, key) => {
    if (item.cardid == data.CardNo) {
      let obj = workers.get(key)
      Object.assign(obj, json)
      workers.set(key, obj)
      localforage.setItem("worker", workers)
    }
  })
}
// 每分钟查询是否有新的刷卡记录，然后
// setInterval(() => {
//   getInOut(data)
// }, 1000)

export { default as Worker } from "./Worker"
export { default as Team } from "./Team"
export { default as Inout } from "./Inout"
export { default as AccessControl } from "./AccessControl"
export { default as Statistics } from "./Statistics"
